package com.esri.android.map.bing;

import com.esri.core.internal.util.d;
import com.esri.core.io.EsriServiceException;
import com.esri.core.map.bing.Result;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;

/* loaded from: classes.dex */
public class BingMapsResult implements Result, Serializable {
    private static final long serialVersionUID = 1;
    private String a;
    private String[] b = new String[0];
    private int c;
    private int d;
    private String e;
    private String f;
    private int g;
    private int h;

    public String getImageUrl() {
        return this.a;
    }

    public String[] getImageUrlSubdomains() {
        return this.b;
    }

    public int getImageWidth() {
        return this.c;
    }

    public int getImageHeight() {
        return this.d;
    }

    public String getVintageEnd() {
        return this.e;
    }

    public String getVintageStart() {
        return this.f;
    }

    public int getZoomMin() {
        return this.g;
    }

    public int getZoomMax() {
        return this.h;
    }

    @Override // com.esri.core.map.bing.Result
    public void fromJson(JsonParser jsonParser, int i) throws Exception {
        if (!d.c(jsonParser)) {
            throw new EsriServiceException("This response cannot be parsed.");
        }
        while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
            String currentName = jsonParser.getCurrentName();
            jsonParser.nextToken();
            if ("imageUrl".equals(currentName)) {
                this.a = jsonParser.getText();
            } else if ("imageUrlSubdomains".equals(currentName)) {
                ArrayList arrayList = new ArrayList();
                while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                    arrayList.add(jsonParser.getText());
                }
                this.b = (String[]) arrayList.toArray(new String[0]);
            } else if ("imageWidth".equals(currentName)) {
                this.c = jsonParser.getIntValue();
            } else if ("imageHeight".equals(currentName)) {
                this.d = jsonParser.getIntValue();
            } else if ("vintageStart".equals(currentName)) {
                this.f = jsonParser.getText();
            } else if ("vintageEnd".equals(currentName)) {
                this.e = jsonParser.getText();
            } else if ("zoomMin".equals(currentName)) {
                this.g = jsonParser.getIntValue();
            } else if ("zoomMax".equals(currentName)) {
                this.h = jsonParser.getIntValue();
            } else {
                jsonParser.skipChildren();
            }
        }
    }

    public String toString() {
        return "BingMapsResult [imageUrl=" + this.a + ", imageUrlSubdomains=" + Arrays.toString(this.b) + ", imageWidth=" + this.c + ", imageHeight=" + this.d + ", vintageEnd=" + this.e + ", vintageStart=" + this.f + ", zoomMin=" + this.g + ", zoomMax=" + this.h + "]";
    }
}
